Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIMITATION] Feature: allow multiple Limiters with different configurations #292

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

GreeFine
Copy link
Contributor

@GreeFine GreeFine commented Oct 4, 2022

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the nightly rustfmt (cargo +nightly fmt).

Overview

Currently I can declare and use only one Limiter who can hold one configuration
This PR adds the possibility to create a multitude of Limiter so we can have different configurations

Note

I added a method to build the Limiter with an already existing Client (builder_with_redis_client) to prevent re-creating a new client for each new Limiter
I don't actually know if this was a good idea and is making any performance improvements. And I didn't have the time to test it

@robjtede robjtede added B-semver-minor A-limitation Project: actix-limitation labels Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-limitation Project: actix-limitation B-semver-minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants